package cn.iocoder.yudao.module.biz.dal.mysql.htPlanDetailexeannexs;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.biz.dal.dataobject.htPlanDetailexeannexs.HtPlanDetailexeannexsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.biz.controller.admin.htPlanDetailexeannexs.vo.*;

/**
 * 隐患排查计划执行结果附件 Mapper
 *
 * @author riven
 */
@Mapper
public interface HtPlanDetailexeannexsMapper extends BaseMapperX<HtPlanDetailexeannexsDO> {

    default PageResult<HtPlanDetailexeannexsDO> selectPage(HtPlanDetailexeannexsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<HtPlanDetailexeannexsDO>()
                .eqIfPresent(HtPlanDetailexeannexsDO::getPlanDetaiExeId, reqVO.getPlanDetaiExeId())
                .eqIfPresent(HtPlanDetailexeannexsDO::getOssId, reqVO.getOssId())
                .betweenIfPresent(HtPlanDetailexeannexsDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
                .orderByDesc(HtPlanDetailexeannexsDO::getId));
    }

    default List<HtPlanDetailexeannexsDO> selectList(HtPlanDetailexeannexsExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<HtPlanDetailexeannexsDO>()
                .eqIfPresent(HtPlanDetailexeannexsDO::getPlanDetaiExeId, reqVO.getPlanDetaiExeId())
                .eqIfPresent(HtPlanDetailexeannexsDO::getOssId, reqVO.getOssId())
                .betweenIfPresent(HtPlanDetailexeannexsDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
                .orderByDesc(HtPlanDetailexeannexsDO::getId));
    }

}
